//
//  UtilsHeader.h
//  WKWebVIewDemo
//
//  Created by Yonger on 2018/7/19.
//  Copyright © 2018年 WKWebView. All rights reserved.
//

#ifndef UtilsHeader_h
#define UtilsHeader_h
#define kLoginURL @"http://139.129.23.198:2018/v1/user/login"
#define kRequestURL @"http://139.129.23.198:2018"
#define kTokenFailedNotification @"TokenFailureNotificationCenter"
// 消息通知
#define RegisterNotify(_name, _selector)                    \
[[NSNotificationCenter defaultCenter] addObserver:self  \
selector:_selector name:_name object:nil];

#define RemoveNofify            \
[[NSNotificationCenter defaultCenter] removeObserver:self];

#define SendNotify(_name, _object,_userInfo)  \
[[NSNotificationCenter defaultCenter] postNotificationName:_name object:_object userInfo:_userInfo ];

#define viewBackgroung(s)     s.backgroundColor = RANDOM_COLOR;

#define ColorWithSixteen(s,al)  ([UIColor colorWithRed:(((s & 0xFF0000) >> 16))/255.0 green:(((s &0xFF00) >>8))/255.0 blue:((s &0xFF))/255.0 alpha:al])
#define UScreenWidth  ([UIScreen mainScreen].bounds.size.width)
#define UScreenHeight ([UIScreen mainScreen].bounds.size.height)

#define iPhoneX (CGSizeEqualToSize([UIScreen mainScreen].bounds.size,CGSizeMake(375, 812)) || CGSizeEqualToSize([UIScreen mainScreen].bounds.size, CGSizeMake(812, 375)))

#define IOS11 (([[UIDevice currentDevice].systemVersion doubleValue] >=11.0)?YES:NO)
#define IOS10 (([[UIDevice currentDevice].systemVersion doubleValue] >=10.0)?YES:NO)
#define IOS9  (([[UIDevice currentDevice].systemVersion doubleValue] >=9.0)?YES:NO)
#define IOS8  (([[UIDevice currentDevice].systemVersion doubleValue] >=8.0)?YES:NO)
#define IOS7  (([[UIDevice currentDevice].systemVersion doubleValue] >=7.0)?YES:NO)

#define iPhoneXSafeArea     24

#define kNaviBarHeight       44
#define kTabBarHeight        ((iPhoneX)?83:49)
#define hNaviBarHeight       ((iPhoneX)?88:64)
#define kNaviBarItemHeight   49
#define kStatusBarHeight     ((iPhoneX)?44:20)

#define kBottomLineHeight     ((iPhoneX)?34:0)

#define kNaviBarABXHeight    (hNaviBarHeight - kStatusBarHeight)

#define DeviceIsPortrait   [UtilsConfigModel isOrientationPortrait]

#endif /* UtilsHeader_h */
